﻿using TestingConcurrencyBenchmark.Helpers;

namespace TestingConcurrencyBenchmark.Problems.DiningPhilosophers.Philosophers
{
    internal class RightHandedPhilosopher : AbstractPhilosopher
    {
        public RightHandedPhilosopher(BenchmarkSemaphore leftFork, BenchmarkSemaphore rightFork) : base(leftFork, rightFork)
        {
        }

        public override void GetForks()
        {
            RightFork.WaitOne();
            LeftFork.WaitOne();
        }

        public override void PutForks()
        {
            RightFork.Release();
            LeftFork.Release();
        }
    }
}